package com.xyzwps.orm.jooq;

import com.zaxxer.hikari.HikariDataSource;
import org.jooq.DSLContext;
import org.jooq.SQLDialect;
import org.jooq.impl.DSL;

public class App {

    private final DSLContext dslContext;

    public App() {
        var ds = new HikariDataSource();
        ds.setJdbcUrl("jdbc:mysql://localhost:3306/orm");
        ds.setDriverClassName("com.mysql.cj.jdbc.Driver");
        ds.setUsername("scott");
        ds.setPassword("tiger");
        dslContext = DSL.using(ds, SQLDialect.MYSQL);
    }

    public DSLContext getDslContext() {
        return this.dslContext;
    }
}
